This invention relates to an image encoding device, an image encoding program and an image encoding method for encoding images, an image decoding device, a decoding program, and a decoding method for decoding encoded images, a medium recording an encoded image encoding stream, and a method of transmitting encoded image data.
As methods of recording large quantities of visual and audio information as compressed digital data and transmitting them, encoding systems including the Moving Picture Experts Group (MPEG) system have been formulated, and established as encoding systems of international standards, such as MPEG-1, MPEG-2 and MPEG-4 standards. Systems prescribed for enhancing the rate of compression include the H.264/Advanced Video Coding (AVC) standard (see Joint Video Team (JVT) of ISO/IEC MPEG ITU-T VCEG: “Text of International Standard of Joint Video Specification”, ITU-T Rec. H264|ISO/IEC 14496-10 Advanced Video Coding (December, 2003)). These systems have been adopted as encoding systems for use in digital satellite broadcasting, DVDs, cellular telephones and digital cameras among others, and are now finding even more extensive and familiar use.
Of these encoding systems, the H.264/AVC systems uses, in addition to arithmetic transform encoding techniques using motion compensative prediction and discrete cosine transform (DCT), a technique known as intra-coded predictive encoding. This technique permits prediction of the signal level from an encoded adjoining block in an intra-frame without having to use any other picture information.
FIG. 3 illustrates the intra-coded predictive encoding. The description here will refer, by way of example, to block-by-block prediction, the size of each block being 4×4 pixels, in a raster scanning system of sequentially scanning a frame rightward and downward from the top left. The signal level of a pixel 304 in a prediction block 303 (the block to be predicted) is predicted from the signal level of the boundary pixel 302 of an already encoded adjoining block 301 (the pixels adjoining the prediction block, out of the pixels of the adjoining block 301, except that a pixel on the lowest line where the block adjoining the prediction block to the upper right is concerned), and the difference between the predicted value and the actual value (residual component) is subjected to arithmetic transform encoding by DCT or otherwise. At this step, a pixel 305 of an adjoining block not yet encoded cannot be used for prediction. There are a plurality of directions of prediction (i.e. encoding modes) 306. Residual components resulting from prediction in all the directions are compared, the direction giving the smallest residual component is selected, and that residual component is subjected to arithmetic transform encoding. The direction “0:DC” here is the mode in which the average signal level of all the boundary pixels is used as the predictive value.
Incidentally, in block-by-block prediction in which the size of each block is 16×16 pixels, intra-coded predictive encoding can also be accomplished though the directions of prediction are limited.
Inter-coded predictive encoding, though similar to the conventional MPEG systems, the motion vector of each block is encoded as the difference from the upper and left side motion vectors, which are already encoded.